<div id="content">
                    	<h3>Thêm sản phẩm</h3>
                        
                        <a class="back" href="<?php echo base_url() ?>index.php/Quanlysanpham/index">Quay lại</a> 
                              
                        <div id="contentFunc">
                        	<?php 
								$attributes = array('id'=>'frmCapNhatSP','name'=>'frmCapNhatSP','enctype'=>'multipart/form-data');
								echo form_open_multipart('Quanlysanpham/submit_them',$attributes);	
								
							?>
                              <div class="blockSP">
                                <label class="lblSanPham" for="txtTenSP">Tên sản phẩm:</label>
                                <input class="input" type="text" id="txtTenSP" name="tensanpham"/>
                              </div>
                               <div class="blockSP">
                                <label class="lblSanPham" >Danh mục:</label>
                                <?php 
								if(!isset($danhmucs))
								{
								}else{
									if(is_array($danhmucs))
									{
											$options = array();
											foreach ($danhmucs as $item)
											{
												$options[$item['madm']]=$item['tendanhmuc'];
											}
											 if(isset($danhmuc))
											{
												echo form_dropdown('ma_dm', $options, $danhmuc); 
											}
											 else
											{
												echo form_dropdown('ma_dm', $options);
											}
									}
								}		 
								?>
							
                              </div>
                              <div class="blockSP">
                                <label class="lblSanPham" for="txtMoTaSP">Mô tả:</label>
                                <textarea class="input" id="txtMoTaSP" name="mota"></textarea>
                              </div>
                               <div class="blockSP">
                                <label class="lblSanPham" for="txtMoTaSP_En">Mô tả (tiếng Anh):</label>
                                <textarea class="input" id="txtMoTaSP_En" name="mota_en"></textarea>
                              </div>
                              <div class="blockSP">
                                <label class="lblSanPham" for="txtDonGia">Đơn giá:</label>
                                <input class="input" type="number" id="txtDonGia" name="dongia"/>
                              </div>
                              
                              <div class="blockSP">
                                <label class="lblSanPham" for="txtSoLuongTon">Số lượng:</label>
                                <input class="input" type="number" id="txtSoLuongTon" name="soluong"/>
                              </div>
                              
                              <div id="chiTietSP">
                                <label id="lblChiTiet" for="txtChiTietSP">Tiếng Việt:</label>
                                <textarea id="txtChiTietSP" name="chitiet"></textarea>
                                
                                <script type="text/javascript">
                                	CKEDITOR.replace("txtChiTietSP");
                                </script>
                              </div>
                               <div id="chiTietSP">
                                <label id="lblChiTiet" for="txtChiTietSP">Tiếng Anh:</label>
                                <textarea id="txtChiTietSP_En" name="chitiet_en"></textarea>
                                
                                <script type="text/javascript">
                                	CKEDITOR.replace("txtChiTietSP_En");
                                </script>
                              </div>
                              <div class="blockSP">
                                <label class="lblSanPham" for="txtDonViTinh">Đơn vị tính:</label>
                                <input class="input" type="text" id="txtDonViTinh" name="donvitinh"/>
                              </div>
                              
                              <div class="blockSP">
                                <label class="lblSanPham" for="filHinhDaiDien">Hình đại diện:</label>
                                <input class="input" type="file" id="filHinhDaiDien" name="filHinhDaiDien"/>
                              </div>
                              
                              <div class="blockSP">
                                <label class="lblSanPham" for="filHinh">Hình nhỏ:</label>
                                <input class="input" type="file" id="filHinh" multiple="multiple" name="filHinh[]"/>
                              </div>
                              
                              <div class="thongbao_err">
								  <?php 
                                    echo validation_errors();
                                    if(!empty($img['error_upload']))
                                    {
                                        echo $img['error_upload'];
                                    }
                                    if(!empty($thongbao))
                                    {
                                        echo $thongbao;
                                        }				
                                  ?>
                              </div>
                              
                              <div class="blockSP button">
                              	<input type="submit"  id="btnThemSP" value="Thêm" />
                				<input type="reset" name="btnHuyBo" id="btnHuyBo" value="Hủy bỏ" />
                              </div>
                           </form>
                        </div>
                    </div>
            </div>